package com.woniu.entity;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class Constant {
    @Value("${qiNiu.accessKey}")
    private String accesskey;
    @Value("${qiNiu.secretKey}")
    private String secretKey;
    @Value("${qiNiu.bucket}")
    private String bucket;


    public static  String QINIU_ACCESSKEY;
    public static  String QINIU_SECRETKEY ;
    public static  String QINIU_BUCKET ;

    @PostConstruct
    public void init(){
        QINIU_ACCESSKEY = this.accesskey;
        QINIU_SECRETKEY = this.secretKey;
        QINIU_BUCKET = this.bucket;
    }

    public static String REDIS_ALL_UPLOAD_IMAGE = "REDIS_ALL_UPLOAD_IMAGE";
    public static String REDIS_DB_UPLOAD_IMAGE = "REDIS_DB_UPLOAD_IMAGE";


}
